package com.czd.support.enums;

/**
 * Created by Jerru.hu on 2014/7/31.
 */
public enum SexEnum {
    女,男;

	/**
	 * 根据状态码或者状态的中文类型
	 * @param status
	 * @return
	 */
	public static String getSexStr(int status){
		try {
			return valueOf(status).toString();
		} catch (Exception e) {
			return "";
		}
	}

	public static SexEnum valueOf(int eid) throws Exception {
		for(SexEnum s: values())
		{
			if(s.ordinal()==eid)
				return s;
		}
		throw new IllegalArgumentException("No enum const class with your eid");
	}
}
